home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 October / EnigmA AMIGA RUN 22 (1997)(G.R. Edizioni)(IT)[!][issue 1997-10 & 11][EAR-CD VI].iso / earcd / util1 / adoc.lha / ADocEnglish.doc < prev    next >
Text File  |  1997-05-24  |  22KB  |  502 lines

  1.  
  2.  
  3.                               ADoc - User's Manual
  4.  
  5.  
  6.  
  7.  
  8.  
  9. AboutThisDoc
  10.  
  11.           This manual describes release 5.00 of the utility ADoc. This program
  12.   is Copyrigth ©1990-1997 by Denis GOUNELLE. Any commercial usage  or  selling
  13.   without author's written authorization is strictly forbidden. You  can  copy
  14.   and spread this program under the following conditions:
  15.  
  16.         - all the files are provided
  17.         - the files are not modified in any way
  18.         - you don't charge more than $6 for copy fee
  19.  
  20.           In spite of several tests, no warranty is made  that  there  are  no
  21.   errors in ADoc. YOU USE THIS PROGRAM AT YOUR OWN RISK. In no event will I be
  22.   liable for any damage, direct or indirect, resulting of the use of ADoc.
  23.  
  24. Foreword
  25.  
  26.           ADoc  is  an  utility  that  allows  you  to  visualize  "hypertext"
  27.   documents. If you want to know what it means and to see what  ADoc  can  do,
  28.   just click twice on  the word that follows : Explanation.
  29.  
  30.           Criticisms and suggestions will always be welcomed. Write to:
  31.  
  32.                                M. GOUNELLE Denis
  33.                               27, rue Jules GUESDE
  34.                             45400 FLEURY-LES-AUBRAIS
  35.                                      FRANCE
  36.  
  37.                          denis.gounelle@ramses.fdn.org
  38.  
  39. Explanation
  40.  
  41.        CONGRATULATIONS ! You've just understood how it worked !
  42.  
  43.   When you double-clicked on a single word in the text, ADoc has searched  the
  44.   text associated to this word, in the documentation file, and  opened  a  new
  45.   window to show you this text.
  46.  
  47.   What makes ADoc different from other programs of this type :
  48.  
  49.     - you can double-click on any word in the text, and ADoc will  search  for
  50.       it (no more trouble because  the  document's  author  has  forgotten  an
  51.       hypertext link !).
  52.  
  53.     - this implies that there is no need to  define  hypertext  links  in  the
  54.       document (no more headaches for  the  author,  who  had  to  define  and
  55.       maintain theses links in all the document !)
  56.  
  57.     - ADoc displays several windows at the same time (unless you ask  him  not
  58.       to do so) and handles several document files at the same time.
  59.  
  60.     - ADoc can use straight files in the AutoDoc and AmigaGuide format.
  61.  
  62.     - ADoc has a lot of  little  tricks  and  useful  functions,  like  string
  63.       searching in all the opened files, an AREXX port, and so on... (read the
  64.       documentation, this time !)
  65.  
  66. Installation
  67.  
  68.           ADoc can be used on any Amiga computer under release 2.04  (V36)  or
  69.   greater of the operating system.
  70.  
  71.           ADoc is now localized, so it  can  adapt  itself  to  your  favorite
  72.   language. All you have to do is to copy  the  good  catalog  file  into  the
  73.   directory corresponding to your  language.  For  exemple,  if  your  default
  74.   language   is    french,    copy    the    "français.catalog"    into    the
  75.   "SYS:Locale/Catalogs/Français" directory, under the name "ADoc.catalog."
  76.  
  77. ADocFileFormat
  78.  
  79.           ADoc works on documentation files, combined with a keyword (this one
  80.   is named "term" in this doc). Every doc file has an index file  that  allows
  81.   to access the wanted terms nearly immediately. (Note :  as  a  result,  each
  82.   time you change a doc file, you'll have to rebuild  its  index  file.)  When
  83.   ADoc is running, only is loaded in memory the index file. The name  of  this
  84.   index file will be the doc file name plus an ".index" suffix.
  85.  
  86.           You can create your doc files with your favourite text editor; these
  87.   files consist of a series of definitions and each definition has a syntax as
  88.   follows :
  89.  
  90.                   term
  91.                           text line 1
  92.                           text line 2
  93.  
  94.                           etc...
  95.  
  96.                           text line n
  97.  
  98.           At first, consider that the first two lines of a doc file have to be
  99.   empty (or in extreme circumstancies begin with a space or a tab  character).
  100.   The first character of each term must be at column 1 and the text lines must
  101.   begin with a space or a tab character. Empty lines are allowed.
  102.  
  103.           One term can't be more than 32 character long and can't contain  any
  104.   blanks or tabs : valid  characters  are  upper  or  lower  letters,  digits,
  105.   underline, and accented letters (ASCII codes between 192 and 253).  However,
  106.   if needed, you can extend this character set (see below AdvancedConcepts).
  107.           The term amount for each file as well as the text  line  amount  for
  108.   each term are limited only by the available memory on your system).
  109.  
  110.           A text line can't be more than 256 characters. In order to bring out
  111.   some parts of your text, you can use the following ANSI sequences :
  112.  
  113.                   ESC[1m  boldface on
  114.                   ESC[3m  italics on
  115.                   ESC[4m  underline on
  116.                   ESC[22m boldface off
  117.                   ESC[23m italics off
  118.                   ESC[24m underline off
  119.                   ESC[0m  normal character set
  120.  
  121. RunningADocfromCLI
  122.  
  123.   ADoc can be run from Workbench or from  the  CLI.  From  the  CLI,  you  can
  124.   specify the following arguments :
  125.  
  126.   PUBSCREEN name
  127.       Asks ADoc to use the given public screen. By default, ADoc opens  a  new
  128.       custom screen, sized like the Workbench screen. screen.
  129.  
  130.   REXXPORT name
  131.       Specifies  the  name  of  the  AREXX  port  to  open  (will  be  put  to
  132.       upper-case). By default, the port's name is "ADOC_REXX".
  133.  
  134.   ICONNAME title
  135.       Specifies the name of the icon, when ADoc is iconified.
  136.  
  137.   OPTIONS MAKEIDX|QUICK|AREXX|ONEWINDOW
  138.       Specifies program's options.
  139.  
  140.       MAKEIDX
  141.           Tells ADoc the only operation to perform  is  to  create  the  index
  142.           files.
  143.  
  144.       QUICK
  145.           Asks ADoc not to display a text combined to the "AboutThisDoc" term,
  146.           when starting. Usually, each time ADoc opens a file,  it  looks  for
  147.           the "AboutThisDoc" term in this file, and then, if this one  exists,
  148.           displays the corresponding text.
  149.  
  150.       AREXX
  151.           Asks ADoc to go in AREXX mode. More information on how to  use  ADoc
  152.           with AREXX in TheAREXXMode section below.
  153.  
  154.       ONEWINDOW
  155.           Asks ADoc to open only one window at a time.
  156.  
  157.   FONT name
  158.       Asks ADoc to use the given font rather than the default text font.  Name
  159.       must take the form <FontName><SizeY>, for ex. "topaz8". ADoc is able  to
  160.       use any non proportional font.
  161.       If the given font name is "REQUEST", ADoc will open a font requester  so
  162.       that you can select the font to use.
  163.  
  164.   CASE YES|NO
  165.       Asks ADoc if it must  differentiate  lower  and  upper  characters  when
  166.       processing files. This only will concern files whose name is given after
  167.       this option.
  168.  
  169.   SORT YES|NO
  170.       Asks ADoc if it must sort the indexes of files whose name  is  specified
  171.       after this option.
  172.  
  173.   TABSIZE n
  174.       Tells the tab size for the files whose  name  is  specified  after  this
  175.       option. Default size is 8.
  176.  
  177.   Any other argument will be considered as a doc file name to be used. You can
  178.   specify several files, by separating their names by spaces  or  commas  (for
  179.   ex. "ADoc file1 file2" or "ADoc file1,file2"). You can mix  file  names  and
  180.   options but let us remember that FONT, CASE, SORT, and TABSIZE options  only
  181.   concern files you specified after these options.
  182.  
  183.           ADoc will open files in this given order. Unless you indicate a full
  184.   path, firstly files will be looked for in the current directory, then in the
  185.   "ADOC:" one. If you specify a directory name instead of file name, ADoc will
  186.   open all the files in  this  directory  (apart  from  ".info"  and  ".index"
  187.   files).
  188.  
  189. RunningADocFromWorkbench
  190.  
  191.   From Workbench, you can inwoke ADoc in several ways :
  192.  
  193.     - by  double-clicking  on  its  icon  (then  ADoc  will  use  the  default
  194.       documentation file)
  195.     - by double-clicking on one file icon having ADoc as default  tool  (field
  196.       "DEFAULT TOOL")
  197.     - by clicking on icons of several files, holding down the SHIFT  key,  and
  198.       double-clicking on the ADoc icon.
  199.  
  200.   In all these cases, ADoc starts by looking into "TOOL TYPES"  field  of  the
  201.   program icon; this one may contain :
  202.  
  203.       PUBSCREEN=name
  204.       REXXPORT=name
  205.       ICONNAME=title
  206.       OPTIONS=[MAKEIDX|QUICK|AREXX|ONEWINDOW]
  207.       FONT=name
  208.       TABSIZE=n
  209.       SORT=YES|NO
  210.       CASE=YES|NO
  211.  
  212.   For more information on these options, see the  RunningADocfromCLI  section.
  213.   Note option names must be separated by a "|" sign.  After  that,  ADoc  will
  214.   open the doc files you specified; it will open them  as  it  does  from  CLI
  215.   except it examines the "TOOL TYPES" field  of  each  icon.  This  field  may
  216.   contain :
  217.  
  218.       FONT=nom
  219.       TABSIZE=n
  220.       SORT=YES|NO
  221.       CASE=YES|NO
  222.  
  223.   For  more  information  about  these  options,  see  the  RunningADocfromCLI
  224.   section. Note these options only will concern the file corresponding to  the
  225.   icon.
  226.  
  227. StartingADoc
  228.  
  229.           As explained above, ADoc starts by opening the specified file(s). If
  230.   you didn't  specified any file to open, ADoc will  look  if  the  "ADocFile"
  231.   variable is defined :  if so, it's value is used as a  file  name.  You  can
  232.   specify several file names in  the "ADocFile" variable, just as from command
  233.   line (for example: setenv ADocFile  "exec.doc dos.doc").
  234.  
  235.           Then, ADoc attempts as well to open the index file corresponding  to
  236.   each doc file. If ADoc can't find the index file, it will  offer  to  create
  237.   it. If you refuse, this doc file will not be usable but,  in  spite  of  it,
  238.   ADoc will try to open the other files.
  239.           If ADoc detects a doc file was changed after an index  was  created,
  240.   it will offer to  update the index file. If you refuse, in spite of it,  the
  241.   doc file will be opened but  ADoc may have some  troubles  later  with  this
  242.   file (if it's content has changed). Note  the date of index file creation is
  243.   stored in the index file itself.
  244.  
  245.           Once all files are opened, ADoc will display a requester : this  one
  246.   indicates either the term list of the sole opened file, or the list  of  the
  247.   opened  files.  We'll  describe  how  to   use   this   requester   in   the
  248.   TheTermRequester section.
  249.  
  250. TheTermRequester
  251.  
  252.           A term can be pointed out by a mouse click on it. Now this  term  is
  253.   displayed at the bottom of the requester. If you click a second time on  it,
  254.   the requester is switched off  and  ADoc  displays  in  a  window  the  text
  255.   corresponding to that term. We'll describe  how  to  use  these  windows  in
  256.   HowToManageWindows section.
  257.  
  258.           To choose a term, you can use the keyboard too.  If  you  press  any
  259.   key, the key letter will be added to the current "prefix"  (displayed  in  a
  260.   rectangle below the term list), and ADoc will display the list starting from
  261.   the first term that begins with this prefix. ADoc will complete this  prefix
  262.   as far as possible. If you  press  the  <BACKSPACE>  key,  the  last  prefix
  263.   character will be deleted and the list will be updated too. If you press the
  264.   <RETURN> key, ADoc will display the text corresponding  to  the  first  term
  265.   that begins with this prefix. Note ADoc will  not  differentiate  upper  and
  266.   lower letters when the current file is indicated after a CASE=NO option.
  267.  
  268.           You can close  the  requester  without  selecting  a  term  both  by
  269.   pressing the <ESC> key and by clicking in the close  gadget  either.  If  no
  270.   window is open at this time, the program will abort (except  if  running  in
  271.   AREXX mode).
  272.  
  273.           In fact, a term requester can allow you to select from  among  three
  274.   lists : the term list of the current file, the list of the opened files  (if
  275.   you have several opened files) and the list of terms that ADoc found  during
  276.   the previous search operation (provided a search was made  before,  see  the
  277.   Search section below).
  278.           To switch from a list to another, press the <TAB> key. When the file
  279.   list is displayed  and  you  select  a  file  in  this  list,  ADoc  returns
  280.   automatically to the term list and displays the list of terms in that  file.
  281.  
  282.           The term requester has a menu with the following options :
  283.  
  284.           Open term       see TheProjectMenu below
  285.           Search          see the Search section below
  286.           Iconify         see the TheProjectMenu below
  287.           Quit            this one allows to quit ADoc.
  288.  
  289.           The term  requester  uses  the  font  specified  in  the  last  FONT
  290.   argument. So, if you want to use a different font for  this  requester,  you
  291.   just have to append a FONT argument as the last argument.
  292.  
  293. HowToManageWindows
  294.  
  295.           When you  select  a  term,  ADoc  opens  a  window  to  display  the
  296.   corresponding text. The window height is dependent on the  amount  of  lines
  297.   ADoc must display. If there are too many lines, only the first page will  be
  298.   displayed. Use the scroller at the right of the window to scroll this  text.
  299.  
  300.           By default, these windows have standard close,  dragging,  back  and
  301.   front, and sizing gadgets. Each window has  three  menus  too  :  there  are
  302.   "Project",  "Tools"  and  "Options"  menus  (I'll  describe  these  ones  in
  303.   TheProjectMenu, TheToolsMenu and TheOptionsMenu sections, below).
  304.  
  305.           Finally, note ADoc recognize the following keys :
  306.  
  307.           ESC             closes the current window
  308.           UP              scrolls one line up
  309.           DOWN            scrolls one line down
  310.           SHIFT-UP        scrolls one page up
  311.           SHIFT-DOWN      scrolls one page down
  312.           ALT-UP          go to the first page
  313.           ALT-DOWN        go to the last page
  314.           CTRL-UP         shows the previous term
  315.           CTRL-DOWN       shows the next term
  316.  
  317.           When you click on a word, this one will be displayed in a  different
  318.   colour. If you click again on the same word, ADoc will  automatically  start
  319.   searching for the corresponding term in  all  open  files.  If  this  fails,
  320.   screen flashes, otherwise a new window will be brought up.
  321.  
  322.           All term windows (and the term requester as well)  are  declared  as
  323.   "AppWindows" (application windows). This mean that you can drop  Workbench's
  324.   icons on these windows : the file(s) corresponding to these  icons  will  be
  325.   scanned, and added to the opened files list.
  326.  
  327. TheProjectMenu
  328.  
  329.   Open file
  330.       Allow to open an additional doc file. A file requester is brought up  so
  331.       that you can specify what a file must be opened.
  332.  
  333.   Other term
  334.       Bring up the term requester (see above TheTermRequester).
  335.  
  336.   Find
  337.       Allow to start a search operation (see the Search section)
  338.  
  339.   Iconify
  340.       Leave ADoc sleeping : all the windows will be switched off and then ADoc
  341.       will open an icon on the Workbench's screen.  For  "awaking"  ADoc,  you
  342.       just have to double-click on this icon : all the windows will be brought
  343.       back.
  344.       The icon will be the same as the program's  one  :  if  you  start  ADoc
  345.       twice, from two different directories, containing different icons,  then
  346.       each program will have a different icon.
  347.       The icon will be declared as an "AppIcon" (application icon). This  mean
  348.       that you can drop Workbench's icons on it : the file(s) corresponding to
  349.       these icons will be scanned, and added to the opened files list.
  350.  
  351.   About...
  352.       Display some informations about ADoc.
  353.  
  354.   Quit
  355.       Allow to quit ADoc (asks you to confirm it).
  356.  
  357.  
  358. TheToolsMenu
  359.  
  360.   Print
  361.       Print the text of the current window. Note : the possible ANSI sequences
  362.       will be correctly interpreted by the printer.
  363.  
  364.   Save as
  365.       Save the text of the current window. Note : the possible ANSI  sequences
  366.       will not be written to the file.
  367.  
  368.   Close all
  369.       Allow to close all the windows at the same time.
  370.  
  371. TheOptionsMenu
  372.  
  373.   One window
  374.       If this option is selected, ADoc will open only one window at a time.
  375.  
  376. Search
  377.  
  378.           ADoc can search for a string into :
  379.  
  380.   - the current term (when you select the "Find" menu item of a term  window).
  381.     In this case, if you have selected a word in a term window, this word will
  382.     be taken as the default value for the string to find.
  383.   - all the terms of a file (when you select the "Find"  menu  item  when  the
  384.     term requester  shows a file's term list)
  385.   - all the terms of all the files (when you select the "Find" menu item  when
  386.     the term requester show's the file list).
  387.  
  388.           In the first case,  once  the  search  is  completed,  the  window's
  389.   content will be redrawn and any occurence will be put  in  bold  characters.
  390.   The display is also moved so the line  with the first occurence will  be  at
  391.   the top of the window.
  392.  
  393.           In the two other cases, a requester appears so you  can  follow  the
  394.   search progress. The  "Abort" gadget of this requester allows you  to  break
  395.   this search. As soon as the search  finished, screen will flash if  no  term
  396.   was found. Otherwise, the term requester  will  be   switched  on  and  will
  397.   display the list of found terms. That list is sorted, and  kept  in   memory
  398.   until you stard a new search.
  399.  
  400. AdvancedConcepts
  401.  
  402.           In your documentation files, you  can  define  aliases,  that  is  a
  403.   manner to associate  a same text to several terms, without having to  repeat
  404.   the  text  several  times.  An   application  of  aliases   could   be   the
  405.   documentation of  a  function  library  :  often  you  will  define  several
  406.   functions together. With aliases, you can allow access to the definition  by
  407.   the name of each function, but the text is defined only once.
  408.           An alias definition follow the syntax:
  409.  
  410.           name1 alias name2
  411.  
  412.   The first character of "name2" must, as  for  any  term  definition,  be  at
  413.   column one. There must be at least one space or tabulation between the three
  414.   words. The word "alias" must be in lower case characters. The effect of such
  415.   a definition is that when the user will ask to get the  "name1"  term,  ADoc
  416.   will automatically display the "name2" term instead. Aliases appear  in  the
  417.   term requester, and in the search function. You must be aware that there  is
  418.   *NO* recursivity check between aliases !
  419.  
  420.                               --------------------
  421.  
  422.           ADoc can combine automatically several doc  files.  For  that,  it's
  423.   enough to specify the name of file(s) to be combined, in the first  line  of
  424.   file which you want associate them with. If this line  is  empty  or  begins
  425.   with a space or tab, its contents will be ignored. File  names  have  to  be
  426.   separated by spaces or commas. You can indicate a directory  name;  in  this
  427.   case all the files of that directory will  be  opened  (except  ".info"  and
  428.   ".index" files).
  429.           Unless you indicate a full path, firstly files will be looked for in
  430.   the directory of the calling file, then in the "ADOC:" directory.
  431.  
  432.                               --------------------
  433.  
  434.           To extend the character set you can use in a term,  it's  enough  to
  435.   specify additional characters in the second line of your doc file.  If  this
  436.   line is empty or begins with a space or tab, its contents will  be  ignored.
  437.   Otherwise, all characters of that line (up to first  space,  tab,  slash  or
  438.   form feed) will be added to the default character set. Note  this  character
  439.   set extension only will concern that file.
  440.  
  441. TheAREXXMode
  442.  
  443.           ADoc always  opens  a  compatible  AREXX  port,  named  "ADOC_REXX".
  444.   Messages on this port can take the following forms :
  445.  
  446.           QUIT            quits ADoc
  447.           HIDE            iconifies ADoc
  448.           SHOW            "wakes up" ADoc if it is iconified
  449.           REQUEST         brings up the term requester
  450.           TOFRONT         put ADoc screen in front of all screens
  451.           TOBACK          put ADoc screen in back of all screens
  452.           FIND term       start searching for a given term,  and  display  the
  453.                           corresponding text if it is found
  454.           OPEN file       allows to open one or several  files  while  running
  455.                           ADoc
  456.           CLOSEALL        closes any opened window
  457.  
  458.           Here is an example asking for help for the term "alias" :
  459.  
  460.           /* Ask for help for "alias" */
  461.           ADDRESS "ADoc_rexx"
  462.           "FIND alias"
  463.           IF RC = 10 THEN SAY "not found !"
  464.  
  465.           If you launch ADoc with the option AREXX, the program operation will
  466.   be quite different : once ADoc opened the doc file(s), it will not switch on
  467.   the term requester but will wait for messages on  the  AREXX  port  (or  for
  468.   CTRL-C to abort it). Moreover, when the last  window  will  be  closed,  the
  469.   program will not end itself but go back waiting for AREXX messages.
  470.  
  471. AutoDoc_files_support
  472.  
  473.           ADoc can recognize and use files in the AutoDocs format.  Any  known
  474.   variant of this file format is supported.
  475.  
  476. AmigaGuide_files_support
  477.  
  478.           ADoc can recognize and use files in the AmigaGuide format.  As  ADoc
  479.   doesn't handle spaces  in  term  names,  they  are  replaced  by  underscore
  480.   characters. Links within text  are  displayed  in  boldface.  As  names  are
  481.   truncated to 32 characters, some links may fail.
  482.  
  483.           The @TAB et @FONT commands  (both  global  and  local),  the  @TITLE
  484.   command, font style changes, external links, the escape character ('\')  are
  485.   automatically handled.
  486.  
  487.           Unless the "QUICK" option has been  specified  at  program  startup,
  488.   ADoc will automatically display the "MAIN" node when opening the file.
  489.  
  490. History
  491.  
  492.   v5.00, 06-Apr-97, 75108 bytes
  493.  
  494.     o Rewritten from scratch, in C++, using the SAS/C 6.57
  495.     o New GUI using the "gadtools.library"
  496.     o Can use any public screen
  497.     o Can use a different font for each opened file
  498.     o New iconification handling
  499.     o Better support of AutoDoc and AmigaGuide files
  500.     o All the windows are "AppWindow"s
  501.     o Show the progression of index creation, of string search
  502.